use "replication file.dta",clear

** Table 3 **
reg   cfscores   i.ptype_fed i.year i.st_id  if  seat=="federal:house" & pid=="D" & (ranp==1|rang==1) & numgivers>9,cluster(st_id)
reg   cfscores   i.ptype_fed i.year i.st_id  if  seat=="federal:house" & pid=="R" & (ranp==1|rang==1) & numgivers>9,cluster(st_id)

reg   cfscores   i.ptype i.year i.st_id  if  seat!="federal:house" & pid=="D" & (ranp==1|rang==1) & numgivers>9,cluster(st_id)
reg   cfscores   i.ptype i.year i.st_id  if  seat!="federal:house" & pid=="R" & (ranp==1|rang==1) & numgivers>9,cluster(st_id)


** Table 4 **
reg   cfscores   i.ptype_fed i.year i.st_id  if  seat=="federal:house" & pid=="D" & rang==1 & numgivers>9,cluster(st_id)
reg   cfscores   i.ptype_fed i.year i.st_id  if  seat=="federal:house" & pid=="R" & rang==1 & numgivers>9,cluster(st_id)

reg   cfscores   i.ptype i.year i.st_id  if  seat!="federal:house" & pid=="D" & rang==1 & numgivers>9,cluster(st_id)
reg   cfscores   i.ptype i.year i.st_id  if  seat!="federal:house" & pid=="R" & rang==1 & numgivers>9,cluster(st_id)


** Table 5 **
reg   cfscores   i.ptype_fed i.year i.st_id  if  seat=="federal:house" & pid=="D" & rang==1 & won=="W" & numgivers>9,cluster(st_id)
reg   cfscores   i.ptype_fed i.year i.st_id  if  seat=="federal:house" & pid=="R" & rang==1 & won=="W" & numgivers>9,cluster(st_id)

reg   cfscores   i.ptype i.year i.st_id  if  seat!="federal:house" & pid=="D" & rang==1 & won=="W" & numgivers>9,cluster(st_id)
reg   cfscores   i.ptype i.year i.st_id  if  seat!="federal:house" & pid=="R" & rang==1 & won=="W" & numgivers>9,cluster(st_id)
